package com.mbl.base.modular.mall.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mbl.base.core.common.controller.BaseController;
import com.mbl.base.core.common.dto.MblResult;
import com.mbl.base.core.utils.UtilHttp;
import com.mbl.base.modular.mall.entity.Brand;
import com.mbl.base.modular.mall.entity.Category;
import com.mbl.base.modular.mall.service.IBrandService;
import com.mbl.base.modular.mall.service.ICategoryService;
import com.mbl.base.modular.mall.vo.CatVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 品牌商表 前端控制器
 * </p>
 *
 * @author lwj
 * @since 2020-02-27
 */
@RestController
@RequestMapping("/mall/brand")
public class BrandController extends BaseController<Brand, IBrandService> {


    @Override
    public void machiningList(QueryWrapper<Brand> queryWrapper, String condition) {
        final String name = UtilHttp.getPara("name");
        queryWrapper.like(StringUtils.isNotBlank(name), "name", name);
        final String id = UtilHttp.getPara("id");
        queryWrapper.eq(StringUtils.isNotBlank(id), "id", id);
        super.machiningList(queryWrapper, condition);
    }
}

